from . import db

class ColumnModel(db.Model):
    __tablename__ = 'columns'
    id = db.Column(db.Integer, primary_key=True)
    name = db.Column(db.String(50), nullable=False)
    program_name = db.Column(db.String(100))
    editor = db.Column(db.String(50))
    responsible_editor = db.Column(db.String(50))
    broadcasters = db.Column(db.String(200))
    director = db.Column(db.String(50))

class Review(db.Model):
    __tablename__ = 'reviews'
    id = db.Column(db.Integer, primary_key=True)
    column_id = db.Column(db.Integer, db.ForeignKey('columns.id'))
    name = db.Column(db.String(100), nullable=False)
    script = db.Column(db.String(200), nullable=False)
    broadcast = db.Column(db.String(100), nullable=False)
    padding = db.Column(db.String(100), nullable=False)
    submit_time = db.Column(db.DateTime, default=db.func.current_timestamp())